package com.tarena.charging.order.feign;

import cn.tedu.charging.common.pojo.JsonResult;
import cn.tedu.charging.common.pojo.param.GunStatusUpdateParam;
import cn.tedu.charging.common.pojo.vo.StationInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//添加注解 显示创建openFeign客户端对象
@FeignClient("charging-device")
public interface DeviceClient {
    //根据枪id 查询站场信息
    @GetMapping("/device/station/info/{gunId}")
    JsonResult<StationInfoVO> getStationInfo(@PathVariable("gunId") Integer gunId);

    //根据订单需求 修改gun状态
    @PostMapping("/device/gun/status/using")
    JsonResult<Boolean> updateGunStatus(@RequestBody GunStatusUpdateParam param);
}
